/* DxfARC.java
 *
 * Created on 6 de Dezembro de 2007, 10:22
 *
 * Modified 08/18/2011, 10:40 AM by Adriano
 * Included the attribute @Override to inherited methods
 */

package importadorDXF;

/**
 * @author rafaelbuck
 * @author Adriano Ferreira
 */
public class DxfARC extends DxfCIRCLE
{
    protected float startAngle;
    protected float endAngle;
    
    /** Creates a new instance of DxfARC */
    public DxfARC()
    {
    }
    
    @Override
    public boolean setGroup(short grpNr, float fval)
    {
        switch(grpNr)
        {
        case 50: // '2'
            startAngle = (float)(((double)fval * 3.1415926535897931D) / 180D);
            return true;

        case 51: // '3'
            endAngle = (float)(((double)fval * 3.1415926535897931D) / 180D);
            return true;
        }
        return super.setGroup(grpNr, fval);
    }

    @Override
    public void convert(DxfConverter converter, DxfFile dxf, Object collector)
    {
        converter.convert(this, dxf, collector);
    }

    public final float getStartAngle()
    {
        return startAngle;
    }

    public final float getEndAngle()
    {
        return endAngle;
    }    
}